<template>
  <div class="laboratory-pages">
    <div class="banner-wrapper">
      <div class="banner-box">
        <div class="banner-content">
          <div class="banner-title">数字化实验室</div>
          <div class="banner-desc">
            采用基于物联网技术的智慧实验室控制系统，实现实验室内的数字化实验仪器、照明、空调/新风、多媒体、窗帘、触控一体机、环境监测等设备一键控制、远程控制、定时控制、场景控制、智能联控等，同时通过平台实现数据化、可视化管理。
          </div>
          <div class="banner-btn" @click="handleTo">查看详情</div>
        </div>
        <img class="banner-img" src="/images/laboratory-img.png" />
      </div>
      <div class="menu-box">
        <div
          class="menu-item"
          @click="handleToNext(index)"
          v-for="(item, index) in menuList"
          :key="index"
        >
          {{ item.name }}
        </div>
      </div>
    </div>

    <div class="column-box">
      <img src="/images/laboratory-1.png" class="column-img" alt="" />
    </div>
    <div class="column-box" ref="szrRef">
      <div class="banner-btn" @click="handleTo2">数字人实验助手</div>
      <img src="/images/laboratory-2.png" class="column-img" alt="" />
    </div>
  </div>
</template>
<script setup>
import { onMounted, ref,nextTick } from "vue";
const menuList = ref([
  {
    name: "数字化实验仪器",
  },
  {
    name: "智慧门禁系统",
  },
  {
    name: "空调新风管理系统",
  },
  {
    name: "智能窗帘系统",
  },
  {
    name: "智能照明系统",
  },
  {
    name: "AI实验室助理",
  },
]);


const handleTo = () => {
  window.open("http://iot.fantasy-lab.com/", "_blank");
};
const handleToNext = (index) => {
  if (index == 5) {
    handleTo2();
  } else {
    handleTo();
  }
};
const handleTo2 = () => {
  window.open(
    "https://digital-human.fantasy-lab.com/static/MiniLive_RealTime.html",
    "_blank"
  );
};
</script>
<style lang="less" scoped>
.laboratory-pages{
}
.banner-wrapper {
  padding-top: 90px;
  width: 1920px;
  height: 900px;
  background: linear-gradient(180deg, #e7f1ff 0%, #ffffff 100%);
  .banner-box {
    display: flex;
    width: 1520px;
    height: 614px;
    margin: 0 auto 48px;
    align-items: center;
    justify-content: space-between;
    .banner-content {
      width: 563px;
      .banner-title {
        height: 60px;
        font-family: PingFangSC, PingFang SC;
        font-weight: 600;
        font-size: 50px;
        color: #000000;
        line-height: 60px;
        text-align: left;
        font-style: normal;
        margin-bottom: 40px;
      }
      .banner-desc {
        height: 130px;
        margin-bottom: 24px;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 18px;
        color: #595959;
        line-height: 25px;
        text-align: left;
        font-style: normal;
      }
      .banner-btn {
        width: 241px;
        height: 60px;
        background: #1165ed;
        border-radius: 3px;
        cursor: pointer;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 18px;
        color: #ffffff;
        line-height: 60px;
        text-align: center;
        font-style: normal;
      }
    }
    .banner-img {
      width: 876px;
      height: 614px;
    }
  }
}
.menu-box {
  display: flex;
  align-items: center;
  width: 1520px;
  margin: 0 auto;
  overflow: hidden;
  cursor: pointer;
  .menu-item {
    width: 235px;
    flex-shrink: 0;
    margin-right: 30px;
    height: 160px;
    background: linear-gradient(180deg, #f1fbff 0%, #ffffff 100%);
    border-radius: 8px;
    padding-top: 100px;
    text-align: center;
    font-family: PingFangSC, PingFang SC;
    font-weight: 400;
    font-size: 20px;
    color: #262626;
    line-height: 28px;
    font-style: normal;
  }
}
.column-box {
  width: 1920px;
  position: relative;
  .banner-btn {
    position: absolute;
    top: 100px;
    left: 500px;
    width: 241px;
    height: 60px;
    background: #1165ed;
    border-radius: 3px;
    cursor: pointer;
    font-family: PingFangSC, PingFang SC;
    font-weight: 400;
    font-size: 18px;
    color: #ffffff;
    line-height: 60px;
    text-align: center;
    font-style: normal;
  }

  .column-img {
    width: 1920px;
  }
}
</style>
